package models

import "time"

type Worker struct {
	Id        int64     `gorm:"primaryKey;comment:Id"`
	Name      string    `gorm:"comment:名字"`
	CardNo    string    `gorm:"comment:卡号"`
	WorkPlace string    `gorm:"comment:工作地点"`
	WorkUnit  string    `gorm:"comment:工作单位"`
	GmtModify time.Time `gorm:"comment:更新时间"`
	GmtCreate time.Time `gorm:"comment:创建时间"`
}

func (Worker) TableName() string {
	return "worker"
}

type WorkerSensorRelation struct {
	Id            int64     `gorm:"primaryKey;comment:Id"`
	WorkerId      string    `gorm:"comment:员工id"`
	CardNo        string    `gorm:"comment:卡号"`
	BindStartTime string    `gorm:"comment:绑定开始时间"`
	BindEndTime   string    `gorm:"comment:绑定截止时间"`
	GmtModify     time.Time `gorm:"comment:更新时间"`
	GmtCreate     time.Time `gorm:"comment:创建时间"`
}

func (WorkerSensorRelation) TableName() string {
	return "worker_sensor_relation"
}
